from alg import *
from gen import *

class Test(Solution):
    def testing(self, times=1, len=3):
        gen = Generator()
        test_list = gen.gen(times, len)
        

        ans = []
        for test in test_list:
            re = Solution.maxSatisfaction(self, test)
            ans.append(re)

        print("{}".format("".rjust(50, '-')))
        for i in range(times):
            print("test No.{}:".format(i+1))
            print("test list |  {}".format(test_list[i]))
            print("result    |  {}".format(ans[i][0]))
            print("time cost |  {:.3f} ms".format(ans[i][1]))
            print("{}".format("".rjust(50, '-')))


if __name__ == '__main__':
    t = Test()
    t.testing(times=5, len=10)